<template>
	<view>
		<!-- 顶部 导航栏-->
		<view>
			<van-tabs swipeable @change="onChange" color="#f00" :active="isActive">
			  <van-tab title="待付款" name="notPay">
				  <notPay></notPay>
			  </van-tab>
			  <van-tab title="待发货" name="waitFa">
				  <waitFa></waitFa>
			  </van-tab>
			  <van-tab title="待收货" name="waitShou">
				  <waitShou></waitShou>
			  </van-tab>
			  <van-tab title="全部订单" name="allOrder">
				  <tabItem></tabItem>
			  </van-tab>
			</van-tabs>
		</view>
	</view>
</template>

<script>
	
	export default {
		data() {
			return {
				isActive: '',
			};
		},
		
		methods: {
			onChange(e) {
				let ordername =  e.detail.name
				this.isActive = ordername
			}
		},
		onLoad(option) {
			let type = option.type
			if(type == '0') {
				this.isActive = 'notPay'
			}
			if(type == '1') {
				this.isActive = 'waitFa'
			}
			if(type == '2') {
				this.isActive = 'waitShou'
			}
			if(type == '3') {
				this.isActive = 'allOrder'
			}
		}
	}
</script>

<style lang="scss">

</style>
